<div class="code_selector">
    <div class="main_input_block" title="{{title}}">
        <input class="main_input" [ngClass]="{'ng-invalid':(!maiInputValid)}" type="text" [(ngModel)]="model" placeholder="{{placeholder}}"  (ngModelChange)="filterChanged()" (click)="selectorOpen = true">
        <span *ngIf="model" class="glyphicon glyphicon-remove clear_picker" (click)="hardClear()"></span>
        <i class="material-icons filter_button" (click)="togglePicker()">
            subdirectory_arrow_right
        </i>
        <ng-container *ngIf="selectorOpen">
            <div class="overlay" (click)="selectorOpen = false">
            </div>
            <div class="content_block">
                <h5 class="title" *ngIf="title">{{title}}</h5>
                <div class="codes" *ngFor="let code of codes">
                    <div class="code" title="{{code.key}}">
                        <label class="code_label">{{code.label}}</label>
                        <input type="text" class="code_model" [(ngModel)]="filterModel[code.key]">
                    </div>
                </div>
                <button class="set_button" (click)="set()" i18n="@@SET">SET</button>
            </div>
        </ng-container>
    </div>
</div>